﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	xmlns:local="clr-namespace:WpfTestApplication"
	x:Class="WpfTestApplication.View1"
	d:DesignWidth="640" d:DesignHeight="480">
	<UserControl.Resources>
		<local:View1Model x:Key="View1ModelDataSource" />
	</UserControl.Resources>

	<Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource View1ModelDataSource}}">
        <TextBox Text="{Binding Path=Name}" Height="23" HorizontalAlignment="Left" Margin="12,33,0,0" Name="textBox1" VerticalAlignment="Top" Width="120" />
        <Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="12,62,0,0" Name="button1" VerticalAlignment="Top" Width="120" Command="{Binding SetText}" />
        <Button Content="Undo" Height="23" HorizontalAlignment="Left" Margin="12,91,0,0" Name="button2" VerticalAlignment="Top" Width="75" Command="{Binding Path=UndoManager.Undo}" />
        <Button Content="Redo" Height="23" HorizontalAlignment="Left" Margin="93,91,0,0" Name="button3" VerticalAlignment="Top" Width="75" Command="{Binding Path=UndoManager.Redo}" />
        <ListView Height="212" HorizontalAlignment="Left" Margin="36,142,0,0" Name="listBox1" VerticalAlignment="Top" Width="172" ItemsSource="{Binding Path=FirstList}" AllowDrop="True" PreviewMouseLeftButtonDown="listBox1_PreviewMouseLeftButtonDown" MouseMove="listBox1_MouseMove" local:ListDrop.DropCommand="{Binding Path=FromSeccondToFirst}" SelectionMode="Single" />
        <ListView Height="212" HorizontalAlignment="Left" Margin="245,142,0,0" Name="listBox2" VerticalAlignment="Top" Width="161" ItemsSource="{Binding Path=SeccondList}" AllowDrop="True" PreviewMouseLeftButtonDown="listBox2_PreviewMouseLeftButtonDown" MouseMove="listBox2_MouseMove"  local:ListDrop.DropCommand="{Binding Path=FromFirstToSeccond}" SelectionMode="Single" />
    </Grid>
</UserControl>
